home *** CD-ROM | disk | FTP | other *** search
-
-
-
- TTTTHHHHRRRRAAAASSSSHHHH((((1111)))) TTTTHHHHRRRRAAAASSSSHHHH((((1111))))
-
-
-
- NNNNAAAAMMMMEEEE
- thrash - thrash memory to explore paging behavior
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- tttthhhhrrrraaaasssshhhh [args]
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- _t_h_r_a_s_h will allocate a region of its virtual memory of a size given by
- its arguments, and either randomly or sequentially access that memory in
- order to explore the system paging behavior.
-
- The amount of memory to thrash over is specified by a size flag followed
- by an integer argument, whose units are determined by the particular size
- flag used. The flag may be -m, for megabytes, -p, for pages; or -k for
- kilobytes. An additional argument of -s implies sequential thrashing;
- the default is random. Another optional argument, -n count, gives the
- number of references to make before exiting; it defaults to 10000. An
- optional argument -w followed by an integer time tells thrash to sleep
- for ``time'' seconds after thrashing, but before exiting.
-
- Once the memory is allocated, _t_h_r_a_s_h prints a message on stdout saying
- how much it is using, and then proceeds to thrash over it.
-
- UUUUSSSSAAAAGGGGEEEE
- _t_h_r_a_s_h can be used, in conjunction with _c_v_u_s_a_g_e and _s_q_u_e_e_z_e to determine
- the approximate available working memory on a system. To do so, run the
- command:
- _s_s_u_s_a_g_e _t_h_r_a_s_h -_m _4
- which asks _t_h_r_a_s_h to use about 4 MB of memory. When the command
- completes, the resource usage of _t_h_r_a_s_h is printed; the value labeled
- majf gives the number of major page faults it took, that is the number of
- faults that required a physical read. When run on a machine with a large
- amount of physical memory, this value is the number of faults needed to
- start the program, which is the minimum number for any run.
-
- Then, as superuser, and in a separate window, run _s_q_u_e_e_z_e to lock down
- varying amounts of memory, and rerun ``ssusage thrash -m 4". The major-
- fault number will remain low at first, but as you squeeze out more and
- more memory, it will rise. The amount of available memory reported by
- _s_q_u_e_e_z_e at point at which _t_h_r_a_s_h begins to page-fault tells you the
- combined working set of _t_h_r_a_s_h (~ 4MB), the kernel, and any other
- applications you have running.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- ssusage(1), squeeze(1)
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-